package org.nimi317.web_gis.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.nimi317.web_gis.entity.Permission;

import java.util.List;

/**
 * <p>
 * 权限 Mapper 接口
 * </p>
 *
 * @author nimi317
 * @since 2024-04-13
 */
public interface PermissionMapper extends BaseMapper<Permission> {

    @Select("select permission_name from permission a inner join r_p b on a.id=b.p where b.r=#{id}")
    List<String> getPermissionsByRoleId(@Param("id") Integer roleId);
}
